<?php
use yii\widgets\LinkPager;
$this->registerJsFile('@web/home/user/js/jquery.min.js',['depends'=>['app\assets\AppAsset']]);
//任务提交
?>
<div class="tpl-content-wrapper">
    <div class="tpl-content-page-title">
        任务提交
    </div>
    <ol class="am-breadcrumb">
        <li><a href="<?php echo \yii\helpers\Url::toRoute(['index/index']);?>" class="am-icon-home">首页</a></li>
        <li><a href="<?php echo \yii\helpers\Url::toRoute(['user/index']);?>">后台</a></li>
        <li class="am-active">任务提交</li>
    </ol>
    <div class="tpl-portlet-components">
        <div class="portlet-title">
            <div class="caption font-green bold">
                <span class="am-icon-code"></span> 任务提交
            </div>
            <div class="tpl-portlet-input tpl-fz-ml">
                <div class="portlet-input input-small input-inline">
                    <div class="input-icon right">
                        <i class="am-icon-search"></i>
                        <input type="text" class="form-control form-control-solid" placeholder="搜索..."></div>
                </div>
            </div>
        </div>


        <div class="tpl-block ">
            <table class="am-table am-table-striped am-table-hover table-main">
                <thead>
                <tr>
                    <!--                        <th class="table-check"><input type="checkbox" class="tpl-table-fz-check"></th>-->
                    <th class="table-title">工作ID</th>
                    <th class="table-title">工作名称</th>
                    <th class="table-type">工资</th>

                    <th class="table-set">任务完成后提交</th>
                </tr>
                </thead>
                <tbody>
                <?php foreach ($job as $v):?>
                <tr>
                    <!--                        <td><input type="checkbox"></td>-->
                    <td><?php echo $v->id;?></td>
                    <td><?php echo $v->name;?></td>
                    <td><?php echo $v->price;?></td>
                    <td>
                        <div class="am-btn-toolbar">
                            <a class="am-btn-group am-btn-group-xs">
                                <a href="<?php echo \yii\helpers\Url::to(['user/order-submission','id'=>$v->id]);?>"><button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span>提交任务</button></a>
                        </div>
        </div>
        </td>
        </tr>
        <?php endforeach;?>
        </tbody>
        </table>
        <div class="am-cf">
            <div class="am-fr">
                <ul class="am-pagination tpl-pagination">
                    <?php
                    echo LinkPager::widget([
                        'pagination' => $page,
                        'firstPageLabel' => '首页',
                        'lastPageLabel' => '尾页',
                        'maxButtonCount' => 5,
                        'options' => ['class' => 'am-pagination am-pagination-right'],
                    ]);
                    ?>
                </ul>
            </div>
        </div>
        <hr>
        </div>


    </div>
</div>